/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package towerdefence.view;

import java.awt.Color;
import javax.media.opengl.GL;
import net.phys2d.raw.Body;
import net.phys2d.raw.shapes.Box;
import towerdefence.model.Block;
import towerdefence.model.Builder;

/**
 *
 * @author Andreas
 */
public class GLBodyRenderer {

    public static void drawBody(GL gl, Body body, Color color) {
        if (body instanceof Block) {
            GLBlockRenderer.drawBlock(gl, (Block) body, color.getRGBComponents(null));
        } else if (body instanceof Builder) {
            GLBuilderRenderer.drawBuilder(gl, (Builder) body, color);
        }
    }
    
   
}
